#pragma once

class Line
{
private:
	Dot * d1;
	Dot * d2;
	GLuint VAO;
	GLuint VBO;
	glm::vec3 color;

	int cross(int x1, int y1, int x2, int y2, int x3, int y3);

public:
	Line(Dot * dot1, Dot * dot2);
	~Line();

	Dot * getEnd1() { return d1; }
	Dot * getEnd2() { return d2; }

	bool render();
	void setColor(const glm::vec3 & color);
	bool intersect(Line * line);

public:
	static const glm::vec3 COLOR_F;
	static const glm::vec3 COLOR_T;
};